<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>搜索</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="background: white">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="#" style="margin-left: 300px">林业共享平台</a>
        </div>
        <div>
            <form action="/beiying/search/research" class="navbar-form navbar-left" role="search" method="get" >
                <div class="form-group">
                    <input type="text" name="value" class="form-control" placeholder="Search">
                </div>
            </form>
            <ul class="nav navbar-nav navbar-right" style="margin-right: 300px">
                <li><a href="/beiying/html/index.html"><span></span>首页</a></li>
                <li><a href="#"><span></span>供应</a></li>
                <li><a href="#"><span></span>需求</a></li>
                <li><a href="#"><span></span>市场</a></li>
                <li><a href="#"><span class="glyphicon glyphicon-user"></span> 注册</a></li>
                <li><a href="#"><span class="glyphicon glyphicon-log-in"></span> 登录</a></li>
            </ul>
        </div>
    </div>
</nav>
<div>
    <ul class="nav navbar-nav navbar-left" style="margin-left: 300px;margin-top: 80px">
        <li><a href="#" id="searchTree"><span></span>花树</a></li>
        <li><a href="#" id="searchNew"><span></span>新闻</a></li>
        <li><a href="#" id="searchArticle"><span></span>论文</a></li>
    </ul>
</div>
<div style="padding-top: 150px" id="tree">
    <h3>古树:</h3>
    <div th:if="${not #lists.isEmpty(treeList)}">
        <ul th:each="list: ${treeList}" style="margin-left: 30px;margin-top: 20px">
            <li style="list-style:none">
                <a th:href="@{'/rtree/show?treeName=' + ${list.treeName}}" th:text="${list.treeName}" style="font-size: 20px;"></a>
            </li>
            <li style="list-style:none">
                <div th:text="${list.lName}"></div>
            </li>
            <li style="list-style:none">
                <div th:text="${list.seedName}" class="pull-left"></div>
            </li>
            <li style="list-style:none">
                <div th:text="${#strings.abbreviate(list.treeComment,60)}" class="pull-left" style="margin-left: 30px"></div>
            </li>
        </ul>
    </div>
    <div th:unless="${not #lists.isEmpty(treeList)}">
        <span th:text="${error}" style="margin-left: 30px"></span>
    </div>
</div>
    <div id="flower" style="margin-top: 30px">
        <h3>花卉:</h3>
        <div th:if="${not #lists.isEmpty(flowerList)}">
            <ul th:each="list: ${flowerList}" style="margin-left: 30px;margin-top: 20px">
                <li style="list-style:none">
                    <a th:href="@{'/flower/show?flowerName=' + ${list.flowerName}}" th:text="${list.flowerName}" style="font-size: 20px;"></a>
                </li>
                <li style="list-style:none">
                    <div th:text="${list.lName}"></div>
                </li>
                <li style="list-style:none">
                    <div th:text="${list.belongSlf}" class="pull-left"></div>
                </li>
                <li style="list-style:none">
                    <div th:text="${list.belongSlg}" class="pull-left"  style="margin-left: 20px"></div>
                </li>
                <li style="list-style:none">
                    <div th:text="${#strings.abbreviate(list.character,60)}" class="pull-left" style="margin-left: 30px"></div>
                </li>
            </ul>
        </div>
        <div th:unless="${not #lists.isEmpty(flowerList)}">
            <span th:text="${error}" style="margin-left: 30px"></span>
        </div>
    </div>
    <div id="article" style="padding-top: 150px;display: none">
        <h3>论文</h3>
        <div th:if="${not #lists.isEmpty(articleList)}">
            <ul th:each="list: ${articleList}" style="margin-left: 30px;margin-top: 20px">
                <li style="list-style:none">
                    <a th:href="@{'/article/show?acName=' + ${list.acName}}" th:text="${list.acName}" style="font-size: 20px;"></a>
                </li>
                <li style="list-style:none">
                    <div th:text="${list.acAuthor}" class="pull-left"></div>
                </li>
                <li style="list-style:none">
                    <div th:text="${list.acLevel}" class="pull-left" style="margin-left: 20px"></div>
                </li>
                <li style="list-style:none">
                    <div th:text="${list.acKeyword}"  style="margin-left: 20px"></div>
                </li>
                <li style="list-style:none">
                    <div th:text="${#strings.abbreviate(list.acComment,100)}"></div>
                </li>
            </ul>
        </div>
        <div th:unless="${not #lists.isEmpty(articleList)}">
            <span th:text="${error}" style="margin-left: 30px"></span>
        </div>
    </div>
    <div id="new" style="padding-top: 150px;display: none">
        <h3>新闻</h3>
        <div th:if="${not #lists.isEmpty(treeNewList)}">
            <ul th:each="list: ${treeNewList}" style="margin-left: 30px;margin-top: 20px">
                <li style="list-style:none">
                    <a th:href="@{${list.url}}" th:text="${list.title}" style="font-size: 20px;"></a>
                </li>
                <li style="list-style:none">
                    <div th:text="${list.author}"></div>
                </li>
                <li style="list-style:none">
                    <div id="date" th:text="${#dates.format(list.date,'yyyy-MM-dd')}" class="pull-left"></div>
                </li>
                <li style="list-style:none">
                    <div th:text="${#strings.abbreviate(list.content,60)}" class="pull-left" style="margin-left: 30px"></div>
                </li>
            </ul>
        </div>
        <div th:unless="${not #lists.isEmpty(treeNewList)}">
            <span th:text="${error}" style="margin-left: 30px"></span>
        </div>
    </div>
<script th:src="@{/js/search.js}"></script>
</body>
</html>